
section .data
x dq 0x12345678aabbccdd
 ret_v dq 1234.5678
 tmp dq 0

section .text
extern printf
;if use ld
;global _start
;if use gcc
global main
;_start:
main:
	and rsp,0xffffffffffff0000

	mov rax,1
	mov rdi,1
	mov rsi,msg
	mov rdx,msg_len
	syscall

	;int 3
	fild qword [x]
	fsqrt
	fstp qword [ret_v]
	mov rdx,qword [ret_v]
	movsd xmm0,qword [ret_v]
	mov rsi,qword [x]
	mov rdi,ft
	mov eax,1
	call printf
	mov eax,0

	mov eax,9
	mov rdi,0
	mov rsi,10
	mov rdx,3
	mov r10,33
	mov r8,-1
	mov r9,0
	syscall

	mov rax,60
	mov rdi,11
	syscall
	msg: db "Hello World!",0xa
	msg_len: equ $-msg
	ft: db "sqrt(%llu) is %f",0xa,0